package com.cal.utms.action.maintenance;


import com.cal.utms.dao.maintenance.FundManagerDaoImpl;
import com.cal.utms.dto.maintenance.FMContactPersonDto;
import com.cal.utms.model.maintenance.FundManagerModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class FMContactPersonAction extends ActionSupport implements ModelDriven<FMContactPersonDto> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	FundManagerDaoImpl fundManagerDao = new FundManagerDaoImpl();
	private FMContactPersonDto contactPersonBean = new FMContactPersonDto();
	private int fundManagerId;

	public String getContactPersonByfmId() {
		contactPersonBean.setSuccess(true);
		contactPersonBean.setContactPersonBeans(FundManagerModel.createFmContactPersonBeanList(fundManagerDao.getFundManagerCntPersons(fundManagerId)));
		return Action.SUCCESS;
	}

	@Override
	public FMContactPersonDto getModel() {
		return contactPersonBean;
	}

	public FMContactPersonDto getContactPersonBean() {
		return contactPersonBean;
	}

	public void setContactPersonBean(FMContactPersonDto contactPersonBean) {
		this.contactPersonBean = contactPersonBean;
	}

	public int getFundManagerId() {
		return fundManagerId;
	}

	public void setFundManagerId(int fundManagerId) {
		this.fundManagerId = fundManagerId;
	}

}
